package com.zzw.hj82;

import java.util.Scanner;

/**
 * @Project: hw_java
 * @Description: 将真分数分解为埃及分数
 * @Author: zzw
 */

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextLine()) {
            String[] str = in.nextLine().split("/");
            long a = Long.parseLong(str[0]);
            long b = Long.parseLong(str[1]);
            long c;
            StringBuilder res = new StringBuilder();

            while (a != 1 && b % a != 0) {
                c = b / a + 1;
                a = a * c - b;
                b = b * c;
                res.append("1/").append(c).append("+");
            }
            if (b % a == 0 && a != 1) {
                res.append("1/").append(b / a);
            } else if (a == 1) {
                res.append("1/").append(b);
            }
            System.out.println(res);
        }
    }
}